﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LoungeRepo.Contracts.Core;

namespace Basics
{
    class Person : ILoungeRepoEntityIdentity
    {
        public Person() { this.Id = Guid.NewGuid().ToString(); }

        #region Implementation of ILoungeRepoEntityIdentity
        public string Id { get; set; }
        public string Partition { get { return "Persons"; } }
        #endregion

        public string Name { get; set; }
        public string City { get; set; }

        public Person Spouse { get; set; }

        public override string ToString()
        {
            return string.Format("{0} in {1}, {2}",
                this.Name,
                this.City,
                this.Spouse == null ? "single" : "married");
        }
    }
}
